import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess } from '../_util';

export default [
  {
    url: '/api/sales_order/list',
    timeout: 1000,
    method: 'post',
    response: () => {
      return resultPageSuccess(1, 15, [
        {
          BillId: 'SA230630001',
          BillGui: '1674610459338080258',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-07T10:46:48',
          Currency: 'RMB',
          State: 'Unsubmitted',
          Creator: 'Tim Cooke',
          CreationDate: '2023-06-30T10:47:00.92',
          SalesReps: 'admin',
          RelationId: null,
          Remarks: null,
          IsMps: false,
        },
        {
          BillId: 'SA230629008',
          BillGui: '1674342814185422850',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-15T17:03:22',
          Currency: 'RMB',
          State: 'Unsubmitted',
          Creator: 'Jobs',
          CreationDate: '2023-06-29T17:03:29.343',
          SalesReps: 'Tim Cooke',
          RelationId: null,
          Remarks: null,
          IsMps: false,
        },
        {
          BillId: 'SA230629007',
          BillGui: '1674341589687730178',
          CustomerId: 'JD',
          CustomerName: '京东',
          DeliveryDate: '2023-06-02T09:06:05',
          Currency: 'RMB',
          State: 'Unsubmitted',
          Creator: 'Jobs',
          CreationDate: '2023-06-29T16:58:37.403',
          SalesReps: 'Bill',
          RelationId: null,
          Remarks: null,
          IsMps: false,
        },
        {
          BillId: 'SA230629005',
          BillGui: '1674316797018374146',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-11T10:30:51',
          Currency: 'RMB',
          State: 'Unsubmitted',
          Creator: 'Jobs',
          CreationDate: '2023-06-29T15:20:06.37',
          SalesReps: 'Tim Cooke',
          RelationId: null,
          Remarks: null,
          IsMps: false,
        },
        {
          BillId: 'SA230629004',
          BillGui: '1674296772681269249',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-16T13:58:31',
          Currency: 'RMB',
          State: 'Unsubmitted',
          Creator: 'admin',
          CreationDate: '2023-06-29T14:00:32.193',
          SalesReps: 'Tim Cooke',
          RelationId: null,
          Remarks: null,
          IsMps: false,
        },
        {
          BillId: 'SA230629003',
          BillGui: '1674244026888355841',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-11T10:30:51',
          Currency: 'RMB',
          State: 'Approved',
          Creator: 'Bill',
          CreationDate: '2023-06-29T10:30:56.617',
          SalesReps: 'Tim Cooke',
          RelationId: null,
          Remarks: null,
          IsMps: true,
        },
        {
          BillId: 'SA230629002',
          BillGui: '1674231059497091074',
          CustomerId: 'Apple',
          CustomerName: '苹果',
          DeliveryDate: '2023-06-01T09:39:18',
          Currency: 'RMB',
          State: 'Approved',
          Creator: 'admin',
          CreationDate: '2023-06-29T09:39:24.95',
          SalesReps: 'Tim Cooke',
          RelationId: null,
          Remarks: null,
          IsMps: true,
        },
        {
          BillId: 'SA230629001',
          BillGui: '1674222821263278081',
          CustomerId: 'JD',
          CustomerName: '京东',
          DeliveryDate: '2023-06-02T09:06:05',
          Currency: 'RMB',
          State: 'Approved',
          Creator: 'Bill',
          CreationDate: '2023-06-29T09:06:40.803',
          SalesReps: 'Bill',
          RelationId: null,
          Remarks: null,
          IsMps: true,
        },
      ]);
    },
  },
  {
    url: '/api/item/list',
    method: 'post',
    timeout: 1000,
    response: () => {
      return resultPageSuccess(1, 15, [
        {
          ItemId: 'ZJ005',
          ItemName: '外星人机箱',
          Description: '80*80',
          Unit: 'cm',
          ItemType: '成品',
          State: 'Enable',
          PhotoUrl: '/Image/1673595930395279361.jpg',
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 9999,
          BomId: 'BM230627002',
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 0,
        },
        {
          ItemId: 'ZJ004',
          ItemName: 'RTX4080显卡',
          Description: '30*16',
          Unit: 'cm',
          ItemType: '成品',
          State: 'Enable',
          PhotoUrl: '/Image/1673595395399221250.jpg',
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 9999,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 0,
        },
        {
          ItemId: 'ZJ003',
          ItemName: '金士顿内存条64G',
          Description: '10*4',
          Unit: 'cm',
          ItemType: '成品',
          State: 'Enable',
          PhotoUrl: '/Image/1673594457368297474.jpg',
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 9999,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 0,
        },
        {
          ItemId: 'ZJ002',
          ItemName: 'CPU i9 9700k',
          Description: '6*6',
          Unit: 'cm',
          ItemType: '成品',
          State: 'Enable',
          PhotoUrl: '/Image/1673594028995641345.jpg',
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 9999,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 0,
        },
        {
          ItemId: 'ZJ001',
          ItemName: '外星人主板',
          Description: '35*24',
          Unit: 'cm',
          ItemType: '成品',
          State: 'Enable',
          PhotoUrl: '/Image/1673585089629388801.jpg',
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 9990,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 0,
        },
        {
          ItemId: 'YCL892',
          ItemName: '聚乙烯HDPE',
          Description: null,
          Unit: 'KG',
          ItemType: '原材料',
          State: 'Enable',
          PhotoUrl: null,
          ItemProperty: 'Homemade',
          SafetyStock: 1,
          MaxStock: 1,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 5,
        },
        {
          ItemId: 'YCL891',
          ItemName: '瓶子标签纸',
          Description: '瓶子标签纸',
          Unit: '件',
          ItemType: '原材料',
          State: 'Enable',
          PhotoUrl: null,
          ItemProperty: 'Outsourcing',
          SafetyStock: 1,
          MaxStock: 1,
          BomId: null,
          MRPPropose: false,
          MRPUseInventory: false,
          IsEnableBatch: false,
          MinimumBatch: 1,
          BatchIncrement: 1,
          DefaultVendor: null,
          LeadTime: 5,
        },
      ]);
    },
  },
  {
    url: '/api/sales_customer/list',
    timeout: 1000,
    method: 'post',
    response: () => {
      return resultPageSuccess(1, 15, [
        {
          CustomerId: 'NFSQ',
          ShortName: '农夫山泉',
          FullName: '农夫山泉',
          Address: null,
          Contact: null,
          Tel: null,
          Email: null,
          Phone: null,
          Tax: 0.13,
          Currency: 'RMB',
          Code: null,
        },
        {
          CustomerId: 'JD',
          ShortName: '京东',
          FullName: '京东jd',
          Address: '',
          Contact: null,
          Tel: null,
          Email: null,
          Phone: null,
          Tax: 0.2,
          Currency: 'RMB',
          Code: null,
        },
        {
          CustomerId: 'Apple',
          ShortName: '苹果',
          FullName: '苹果Inc',
          Address: null,
          Contact: null,
          Tel: null,
          Email: null,
          Phone: null,
          Tax: 0.3,
          Currency: 'RMB',
          Code: 'apple',
        },
      ]);
    },
  },
  {
    url: '/api/user_data/list',
    timeout: 1000,
    method: 'post',
    response: () => {
      return resultPageSuccess(1, 15, [
        {
          UserId: '786876',
          UserName: 'testt7878',
          Activate: false,
          Mail: '77',
          Tel: '18888888888',
          Phone: '78',
          CreationDate: '2023-04-20T15:08:01.147',
          IsAdmin: false,
          Department: '模具工程技术研发部',
          Sex: 'Male',
          Birthday: '2023-04-22T15:07:55',
          FamilyAddress: null,
          PhotoUrl: '/Image/1648946492301377537.png',
        },
        {
          UserId: 'admin',
          UserName: 'admin',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Male',
          Birthday: '2023-03-30T01:20:35',
          FamilyAddress: null,
          PhotoUrl: '/Image/1648955176888827906.jpg',
        },
        {
          UserId: 'cj',
          UserName: 'Mark Zuckerberg',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Male',
          Birthday: '2023-03-30T01:20:35',
          FamilyAddress: null,
          PhotoUrl: '/Image/1668176326567133186.jpg',
        },
        {
          UserId: 'cx',
          UserName: 'Tim Cooke',
          Activate: false,
          Mail: 'admin@mosturn.com54',
          Tel: '18888888888',
          Phone: '15779584656',
          CreationDate: '2023-05-10T10:20:19.75',
          IsAdmin: false,
          Department: '前端',
          Sex: 'Male',
          Birthday: '2023-06-01T10:20:17',
          FamilyAddress: null,
          PhotoUrl: '/Image/1656121827660922882.jpg',
        },
        {
          UserId: 'Bill',
          UserName: 'Bill',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: null,
          Phone: null,
          CreationDate: '2023-06-09T15:01:08.413',
          IsAdmin: false,
          Department: '',
          Sex: 'Male',
          Birthday: null,
          FamilyAddress: null,
          PhotoUrl: null,
        },
        {
          UserId: 'lhx',
          UserName: 'Tom',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Male',
          Birthday: '2023-03-30T01:20:35.467',
          FamilyAddress: null,
          PhotoUrl: '',
        },
        {
          UserId: 'lhx21',
          UserName: 'lhx21',
          Activate: false,
          Mail: null,
          Tel: null,
          Phone: null,
          CreationDate: '2023-05-12T14:27:23.203',
          IsAdmin: false,
          Department: '前端',
          Sex: 'Male',
          Birthday: null,
          FamilyAddress: null,
          PhotoUrl: null,
        },
        {
          UserId: 'll',
          UserName: 'Bluce',
          Activate: false,
          Mail: null,
          Tel: null,
          Phone: null,
          CreationDate: '2023-06-14T11:34:04.09',
          IsAdmin: false,
          Department: '',
          Sex: 'Male',
          Birthday: null,
          FamilyAddress: null,
          PhotoUrl: null,
        },
        {
          UserId: 'lxh',
          UserName: 'Jobs',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Male',
          Birthday: '2023-03-30T01:20:35.467',
          FamilyAddress: null,
          PhotoUrl: '',
        },
        {
          UserId: 'lyl',
          UserName: 'Jack',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Male',
          Birthday: '2023-03-30T01:20:35.467',
          FamilyAddress: null,
          PhotoUrl: '',
        },
        {
          UserId: 'test145644',
          UserName: 'Jerry',
          Activate: false,
          Mail: 'l.com',
          Tel: '1106209577',
          Phone: '15779584656',
          CreationDate: '2023-04-20T14:27:57.12',
          IsAdmin: false,
          Department: '开发部',
          Sex: 'Male',
          Birthday: '2023-04-20T14:27:42',
          FamilyAddress: null,
          PhotoUrl: '/Image/1648946732664356866.jpg',
        },
        {
          UserId: 'zcl',
          UserName: 'Mary',
          Activate: false,
          Mail: 'admin@mosturn.com',
          Tel: '000-0000000',
          Phone: '15800000000',
          CreationDate: '2023-03-30T09:36:20.123',
          IsAdmin: false,
          Department: '销售部',
          Sex: 'Female',
          Birthday: '2023-03-30T01:20:35',
          FamilyAddress: null,
          PhotoUrl: '/Image/1650060215950770178.png',
        },
      ]);
    },
  },
  {
    url: '/api/file_attachment/get',
    timeout: 50,
    method: 'get',
    response: () => {
      return resultPageSuccess(1, 15, [
        {
          Id: 2,
          BillKey: null,
          OwnerId: 'SR230726001',
          FileName: 'testImg.jpg',
          FileType: '.jpg',
          FileUrl:
            'https://upload-images.jianshu.io/upload_images/5809200-a99419bb94924e6d.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240',
          FileSize: '18.18 K',
          Creator: 'Tony',
          CreationDate: '2023-07-26T08:56:46.103',
        },
        {
          Id: 3,
          BillKey: null,
          OwnerId: 'SR230726001',
          FileName: '测试导出pdf.pdf',
          FileType: '.pdf',
          FileUrl: 'https://www.gjtool.cn/pdfh5/git.pdf',
          FileSize: '1.30 M',
          Creator: 'Tony',
          CreationDate: '2023-07-26T08:57:03.567',
        },
      ]);
    },
  },
] as MockMethod[];
